<?php 
    if(isset($_GET["table"])) {$table = $_GET["table"];} else{$table = "";}
    if(isset($_GET["ligne"])) {$ligne = $_GET["ligne"];} else{$ligne = "";}
    
    require_once './include/class.pdoSio.inc.php';
    
    if($table == "experience_prof") {
        echo "<div class='container basPage'><fieldset><legend>Ajout d'une expérience professionnelle</legend><form id='ajout' action='./include/ajoutCV.php' method='POST' name='ajout'>
            <div class='row'><div class='span3 offset4'><div><label>Poste</label><input type='text' id='poste' name='poste' /></div>
            <div><label>Année de début</label><input type='text' id='anneeDebut' name='anneeDebut' /></div>
            <div><label>Année de fin</label><input type='text' id='anneeFin' name='anneeFin' /></div>
            <div><label>Fonction</label><input type='text' id='fonction' name='fonction' /></div><br></div>
            <input type='hidden' value='".$table."' name='table' id='table' />
            <input type='hidden' value='".$ligne."' name='ligne' id='ligne' />
            <div class='span3 offset5'><div><input type='submit' /></div></div></div></fieldset>
        </form></div>";
    } elseif ($table == "formation") {
        echo "<div class='container basPage'><fieldset><legend>Ajout d'une formation</legend><form id='ajout' action='./include/ajoutCV.php' method='POST' name='ajout'>
            <div class='row'><div class='span3 offset4'><div><label>Diplôme</label><input type='text' id='Diplome' name='Diplome' /></div>
            <div><label>Année de début</label><input type='text' id='AnneeDebut' name='AnneeDebut' /></div>
            <div><label>Année de fin</label><input type='text' id='AnneeFin' name='AnneeFin' /></div>
            <div><label>Etablissement</label><input type='text' id='Etab' name='Etab' /></div><br></div>
            <input type='hidden' value='".$table."' name='table' id='table' />
            <input type='hidden' value='".$ligne."' name='ligne' id='ligne' />
            <div class='span3 offset5'><div><input type='submit' /></div></div></div>
        </form></div>";
    } elseif ($table == "informatique") {
        echo "<div class='container basPage'><fieldset><legend>Ajout d'une compétence informatique</legend><form id='ajout' action='./include/ajoutCV.php' method='POST' name='ajout'>
            <div class='row'><div class='span3 offset4'><div><label>Compétence</label><input type='text' id='competence' name='competence' /></div><br></div>
            <input type='hidden' value='".$table."' name='table' id='table' />
            <input type='hidden' value='".$ligne."' name='ligne' id='ligne' />
            <div class='span3 offset5'><div><input type='submit' /></div></div></div>
        </form></div>";
    } elseif ($table == "interet") {
        echo "<div class='container basPage'><fieldset><legend>Ajout d'un centre d'intérêt</legend><form id='ajout' action='./include/ajoutCV.php' method='POST' name='ajout'>
            <div class='row'><div class='span3 offset4'><div><label>Musique</label><input type='text' id='musique' name='musique' /></div>
            <div><label>Sport</label><input type='text' id='sport' name='sport' /></div>
            <div><label>Autre</label><input type='text' id='autre' name='autre' /></div><br></div>
            <input type='hidden' value='".$table."' name='table' id='table' />
            <input type='hidden' value='".$ligne."' name='ligne' id='ligne' />
            <div class='span3 offset5'><div><input type='submit' /></div></div></div>
        </form></div>";
    } elseif ($table == "langue") {
        echo "<div class='container basPage'><fieldset><legend>Ajout d'une langue</legend><form id='ajout' action='./include/ajoutCV.php' method='POST' name='ajout'>
            <div class='row'><div class='span3 offset4'><div><label>Langue</label><input type='text' id='langue' name='langue' /></div>
            <div><label>Niveau</label><input type='text' id='niveau' name='niveau' /></div><br></div>
            <input type='hidden' value='".$table."' name='table' id='table' />
            <input type='hidden' value='".$ligne."' name='ligne' id='ligne' />
            <div class='span3 offset5'><div><input type='submit' /></div></div></div>
        </form></div>";
    } else {
        echo "<div class='container basPage'><fieldset><legend>Ajout d'une photo</legend><form enctype='multipart/form-data' id='ajout' action='./include/ajoutCV.php' method='POST' name='ajout'>
            <div class='row'><div class='span3 offset4'><div><label>Photo</label><input type='file' id='photo' name='photo' /></div><br></div>
            <input type='hidden' value='".$table."' name='table' id='table' />
            <input type='hidden' value='".$ligne."' name='ligne' id='ligne' />
            <div class='span3 offset5'><div><input type='submit' /></div></div></div>
        </form></div>";
    }



